<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>我的订单</title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/shop.css">
</head>
<body>
    <div class="goods">
        <table class="table table-bordered">
            <c:forEach items="${orders.datas}" var="order">
                <tr class="orderhead">
                    <td colspan="2">
                        <div class="pull-left">
                            <small>下单时间：${order.orderdate}</small>
                        </div>
                        <div class="pull-right">
                            <small>￥${order.total}</small>
                        </div>
                    </td>
                </tr>
                <c:forEach items="${order.orderItems}" var="item">
                    <tr>
                        <td class="cartimg">
                            <img src="<%=request.getContextPath() %>/resources/images/goodsImages/${item.goods.image}" alt="">
                        </td>
                        <td>
                            <p><strong>${item.goods.name}</strong></p>
                            <p class="price">￥${item.goods.price}</p>
                            <p><small>数量：${item.quantity}</small></p>
                        </td>
                    </tr>
                </c:forEach>
                <tr>
                    <td colspan="2">
                        <div class="pull-left">
                            <span>订单状态</span>
                        </div>
                        <div class="pull-right">
                            <small>${order.state}</small>
                        </div>
                    </td>
                </tr>
                <tr><td colspan="2"></td></tr>
            </c:forEach>
        </table>
    </div>
<script src="<%=request.getContextPath() %>/resources/js/jquery-1.11.2.min.js"></script>
<script src="<%=request.getContextPath() %>/resources/js/bootstrap.min.js"></script>
</body>
</html>